<script setup>
// import BelowApplicationItem from './BelowApplicationItem.vue'
import { RouterView, useRoute, useRouter } from 'vue-router'
const router = useRouter()

const gotoDetails = (id) => {
  console.log('gotoList')
  router.push({
    name: 'ApplicationDetails',
    query: {
      id,
    },
  })
}
let buttonColo = '#736D6D'

let btnType = 'donw'
let btnHight = '70px'
const props = defineProps({
  windowURL: {
    type: String,
    default:
      'https://img.zcool.cn/community/0102c65f8d2d2f11013e45843d8bce.jpg@1280w_1l_2o_100sh.jpg', //advertising  cloud
  },
  bgColor: {
    type: String,
    default: '#31282a', //advertising  cloud
  },
  showTitil: {
    type: Boolean,
    default: false, //advertising  cloud
  },
  itemData: {
    default: {}, //advertising  cloud
  },
})
// https://t14.baidu.com/it/u=183885528,1591047767&fm=58&app=83&size=w931&q=75&n=0&f=JPEG&fmt=auto&maxorilen2heic=2000000
</script>
<template>
  <!-- common-box-shadow -->
  <div class="application-box">
    <van-image width="100%" :src="itemData.icon" />
    <div class="application-item-box" @click="gotoDetails()">
      <div class="item-box-contant typeCloud">
        <div class="box-left">
          <van-image width="44" height="42" radius="6" :src="itemData.icon" />
        </div>

        <div class="box-center">
          <div class="box-center-top">
            {{ itemData.name?.length > 16 ? itemData.name?.slice(0, 16) + '...' : itemData.name }}
          </div>
          <div class="box-center-bottom">{{ itemData.slogan }}</div>
        </div>
        <div class="box-right">
          <!-- <van-button type="danger" size="small" class="down-btn" round>进行中</van-button> -->

          <!-- <el-tag type="danger" effect="dark">进行中</el-tag> -->
          <!-- v-if="btnType == 'gain'" -->
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.application-box {
  position: relative;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  &-introduce {
    width: 100%;
    border-radius: 0 0px 10px 10px;
  }
  .small-title {
    color: var(--van-button-primary-background);
    font-size: 10px;
    font-weight: bold;
  }
  .application-title {
    font-size: 22px;
    margin: 4px 0;
  }
  .small-tip {
    color: rgb(129, 129, 129);
    font-size: 20px;
  }
}

.application-item-box {
  display: flex;
  align-items: center;
  padding: 0 0 0 3%;
  .item-box-contant {
    display: flex;
    align-items: center;
    width: 94%;
  }
  .box-left {
    width: 80px;
    display: flex;
    justify-content: center;
  }
  .typeCloud {
    padding: 6px 0;
  }
  .typeCloud .box-left {
    display: flex;
    justify-content: center;
    justify-content: flex-start;
    width: auto;
    margin-right: 12px;
  }
  .typeCloud .box-right {
    width: auto;
    .down-btn {
      // color: #0d7ffe !important;
      font-weight: bold;
      // background: rgb(245, 245, 245);
      // border-color: rgb(245, 245, 245);
      // color: #0d7ffe !important;
    }
  }
  .box-center {
    flex: 1;
    .box-center-top {
      font-weight: bold;
      margin-bottom: 6px;
      font-size: 13px;
    }
    .box-center-bottom {
      font-size: 12px;
    }
  }
  .box-right {
    width: 90px;
  }
  .down-btn {
    padding: 8px 20px !important;
    font-size: 14px;
  }
  // .white-color {
  //   color: #fff;
  // }
}
</style>
